<%@page pageEncoding="UTF-8" isELIgnored="false" session="false"%>
<%@taglib prefix="f" uri="http://www.slim3.org/functions"%>
<div id="bbBbs">
<div><fmt:message key="label.name"/>:<input type="text" id="bbsName" name="bbsName" maxlength="11" size="11"/><fmt:message key="label.comment"/>:<input type="text" id="bbsCommetn" name="bbsComment" maxlength="256" size="50"/></div>
<div class="btnArea">
	<a href="javascript:void(0);" id="postBbs" class="btn"><span><fmt:message key="btn.post" /></span></a>
</div>
<br>
<div class="bbBbsLineArea">
<c:forEach var="bbBbs" items="${bbBbsList}" varStatus="status">
<div title="" class="bbBbsLine"><span class="bbsName">${f:h(bbBbs.bbsName)}</span>＞<span class="bbsComment">${f:h(bbBbs.bbsComment)}</span></div>
</c:forEach>
</div>
</div>
<script type="text/JavaScript">
var bbBbsLineStr = '<div class="bbBbsLine"><span class="bbsName" name="bbsName"></span>＞<span class="bbsComment" name="bbsComment"></span></div>'

var bbBbsStr = {
	bbBbsLine:bbBbsLineStr
}
	
$(function(){
	//投稿クリックイベント
	$("#postBbs").bind("click",postBbs_click);

});
//投稿ボタンイベント
function postBbs_click(e){
	query = {};
	query["bbBbs"] =$.toJSON(getInput("#bbBbs"));
	query[REQKEY_COMMAND] = REQKEY_COMMAND_POST;
	b_ajax("/top/bbBbs",query,displayBbs,bbBbsStr);

};

var displayBbs = function(json){
	$(".bbBbsLineArea").html("");
	setResponseData(json,bbBbsStr);
}

</script>